# Example input file to test symmetric9 for a St. Venant-
# Kirchhoff material (based on the tensor_mechanics
# tutorial, Step 1, part 2: 2D simulation of uniaxial
# tension with linear elasticity; Step 2, part2, and
# moose/modules/tensor_mechanics/test/tests/
# finite_strain_elastic/finite_strain_elastic_new_test.i

# Status: needs to be converted from finite to small strain

[GlobalParams]
  displacements = 'disp_x disp_y disp_z'
  order = first
[]

[Mesh]
  file = cube.msh
  dim = 3
[]

[Modules/TensorMechanics/Master]
  [./all]
    # St. Venant-Kirchhoff is only defined for small strain
    # TODO: FIX
    strain = FINITE
    # Detects the change of the mesh to second order and
    # automatically sets the variables
    add_variables = true
    # Automatically creates the auxvariables and auxkernels
    # needed to output these stress quanities
    generate_output = 'strain_zz stress_zz vonmises_stress'
  [../]
[]

[Materials]
  [./elasticity_tensor]
    type = ComputeElasticityTensor
    # C_ijkl = '1111  1122  1133  2222  2233  3333  2323  3131  1212'
    C_ijkl =   '3.6e7 1.2e7 1.2e7 3.6e7 1.2e7 3.6e7 1.2e7 1.2e7 1.2e7'
    fill_method = symmetric9
  [../]

  [./stress]
    type = ComputeFiniteStrainElasticStress
  [../]
[]

[BCs]
  [./fix_x]
    type = PresetBC
    variable = disp_x
    boundary = left
    value = 0
  [../]
  [./fix_y]
    type = PresetBC
    variable = disp_y
    boundary = bottom
    value = 0
  [../]
  [./fix_z]
    type = PresetBC
    variable = disp_z
    boundary = back
    value = 0.0
  [../]
  [./pull]
    type = PresetBC
    variable = disp_z
    boundary = front
    value = 100e-6
  [../]
[]

[Preconditioning]
  [./SMP]
    type = SMP
    full = true
  [../]
[]

[Executioner]
  type = Steady

  solve_type = 'NEWTON'

  petsc_options = '-snes_ksp_ew'
  petsc_options_iname = '-pc_type -sub_pc_type -pc_asm_overlap -ksp_gmres_restart'
  petsc_options_value = 'asm lu 1 101'
[]

[Postprocessors]
  [./ave_stress_back_z]
    type = SideAverageValue
    variable = stress_zz
    boundary = back
  [../]
  [./ave_strain_front_z]
    type = SideAverageValue
    variable = strain_zz
    boundary = front
  [../]
[]

[Outputs]
  exodus = true
  print_perf_log = false
[]
